package com.scholarship.common.entity;

/**
 * 返回对象实体
 * code为状态码、msg为提示信息、result为返回的数据
 */
public class RetResult<T> {
    //状态码
    public int code;
    //提示信息
    private String msg;
    //返回的数据
    private T result;

    public RetResult<T> setCode(RetCode retCode) {
        this.code = retCode.code;
        return this;
    }

    public int getCode() {
        return code;
    }

    public RetResult<T> setCode(int code) {
        this.code = code;
        return this;
    }

    public String getMsg() {
        return msg;
    }

    public RetResult<T> setMsg(String msg) {
        this.msg = msg;
        return this;
    }

    public T getResult() {
        return result;
    }

    public RetResult<T> setResult(T result) {
        this.result = result;
        return this;
    }
}
